package com.fishery.monitor.pojo;


import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * <p>
 * 
 * </p>
 *
 * @author 711
 * @since 2021-01-24
 */
@TableName("t_monitor_meteorological_data")
@ApiModel(value="MonitorMeteorologicalData对象", description="")
public class MeteorologicalData implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "id")
    @TableId(value = "id", type = IdType.ID_WORKER_STR)
    private String id;

    @ApiModelProperty(value = "基地id")
    @TableField("baseId")
    private String baseId;

    @ApiModelProperty(value = "所属设备编号")
    @TableField("equipmentId")
    private String equipmentId;

    @ApiModelProperty(value = "电能")
    @TableField("electricEnergy")
    private Double electricEnergy;

    @ApiModelProperty(value = "mV")
    @TableField("electricEnergyUnit")
    private String electricEnergyUnit;

    @ApiModelProperty(value = "光照")
    private Double illumination;

    @ApiModelProperty(value = "Lux")
    @TableField("illuminationUnit")
    private String illuminationUnit;

    @ApiModelProperty(value = "风速")
    @TableField("windSpeed")
    private Double windSpeed;

    @ApiModelProperty(value = "m/s")
    @TableField("windSpeedUnit")
    private String windSpeedUnit;

    @ApiModelProperty(value = "风向")
    @TableField("windDirect")
    private Double windDirect;

    @ApiModelProperty(value = "度")
    @TableField("windDirectUnit")
    private String windDirectUnit;

    @ApiModelProperty(value = "气温")
    @TableField("airTemperature")
    private Double airTemperature;

    @ApiModelProperty(value = "℃")
    @TableField("airTemperatureUnit")
    private String airTemperatureUnit;

    @ApiModelProperty(value = "湿度")
    private Double humidity;

    @ApiModelProperty(value = "%")
    @TableField("humidityUnit")
    private String humidityUnit;

    @ApiModelProperty(value = "雨量")
    private Double rain;

    @ApiModelProperty(value = "mm")
    @TableField("rainUnit")
    private String rainUnit;

    @ApiModelProperty(value = "土温")
    @TableField("soilTemperature")
    private Double soilTemperature;

    @ApiModelProperty(value = "℃")
    @TableField("soilTemperatureUnit")
    private String soilTemperatureUnit;

    @ApiModelProperty(value = "土湿")
    @TableField("soilMoisture")
    private Double soilMoisture;

    @ApiModelProperty(value = "%")
    @TableField("soiMoistureUnit")
    private String soiMoistureUnit;

    private Double cam;

    @TableField("CAMUnit")
    private String CAMUnit;

    @ApiModelProperty(value = "采集时间")
    @TableField("acquisitionTime")
    private Date acquisitionTime;

    @ApiModelProperty(value = "标记删除")
    private String deleted;

    @ApiModelProperty(value = "气象设备工作状态0（关闭）1（工作中）2（故障）")
    @TableField("equipmentWorking")
    private String equipmentWorking;


    public MeteorologicalData buildElectricEnergy(Double electricEnergy){
        this.electricEnergy=electricEnergy;
        return this;
    }
    public MeteorologicalData buildIllumination(Double illumination){
        this.illumination=illumination;
        return this;
    }public MeteorologicalData buildwindSpeed(Double windSpeed){
        this.windSpeed=windSpeed;
        return this;
    }public MeteorologicalData buildwindDirect(Double windDirect){
        this.windDirect=windDirect;
        return this;
    }public MeteorologicalData buildairTemperature(Double airTemperature){
        this.airTemperature=airTemperature;
        return this;
    }public MeteorologicalData buildhumidity(Double humidity){
        this.humidity=humidity;
        return this;
    }public MeteorologicalData buildrain(Double rain){
        this.rain=rain;
        return this;
    }
    public MeteorologicalData buildsoilTemperature(Double soilTemperature){
        this.soilTemperature=soilTemperature;
        return this;
    }
    public MeteorologicalData buildsoilMoisture(Double soilMoisture){
        this.soilMoisture=soilMoisture;
        return this;
    }


    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getBaseId() {
        return baseId;
    }

    public void setBaseId(String baseId) {
        this.baseId = baseId;
    }

    public String getEquipmentId() {
        return equipmentId;
    }

    public void setEquipmentId(String equipmentId) {
        this.equipmentId = equipmentId;
    }

    public Double getElectricEnergy() {
        return electricEnergy;
    }

    public void setElectricEnergy(Double electricEnergy) {
        this.electricEnergy = electricEnergy;
    }

    public String getElectricEnergyUnit() {
        return electricEnergyUnit;
    }

    public void setElectricEnergyUnit(String electricEnergyUnit) {
        this.electricEnergyUnit = electricEnergyUnit;
    }

    public Double getIllumination() {
        return illumination;
    }

    public void setIllumination(Double illumination) {
        this.illumination = illumination;
    }

    public String getIlluminationUnit() {
        return illuminationUnit;
    }

    public void setIlluminationUnit(String illuminationUnit) {
        this.illuminationUnit = illuminationUnit;
    }

    public Double getWindSpeed() {
        return windSpeed;
    }

    public void setWindSpeed(Double windSpeed) {
        this.windSpeed = windSpeed;
    }

    public String getWindSpeedUnit() {
        return windSpeedUnit;
    }

    public void setWindSpeedUnit(String windSpeedUnit) {
        this.windSpeedUnit = windSpeedUnit;
    }

    public Double getWindDirect() {
        return windDirect;
    }

    public void setWindDirect(Double windDirect) {
        this.windDirect = windDirect;
    }

    public String getWindDirectUnit() {
        return windDirectUnit;
    }

    public void setWindDirectUnit(String windDirectUnit) {
        this.windDirectUnit = windDirectUnit;
    }

    public Double getAirTemperature() {
        return airTemperature;
    }

    public void setAirTemperature(Double airTemperature) {
        this.airTemperature = airTemperature;
    }

    public String getAirTemperatureUnit() {
        return airTemperatureUnit;
    }

    public void setAirTemperatureUnit(String airTemperatureUnit) {
        this.airTemperatureUnit = airTemperatureUnit;
    }

    public Double getHumidity() {
        return humidity;
    }

    public void setHumidity(Double humidity) {
        this.humidity = humidity;
    }

    public String getHumidityUnit() {
        return humidityUnit;
    }

    public void setHumidityUnit(String humidityUnit) {
        this.humidityUnit = humidityUnit;
    }

    public Double getRain() {
        return rain;
    }

    public void setRain(Double rain) {
        this.rain = rain;
    }

    public String getRainUnit() {
        return rainUnit;
    }

    public void setRainUnit(String rainUnit) {
        this.rainUnit = rainUnit;
    }

    public Double getSoilTemperature() {
        return soilTemperature;
    }

    public void setSoilTemperature(Double soilTemperature) {
        this.soilTemperature = soilTemperature;
    }

    public String getSoilTemperatureUnit() {
        return soilTemperatureUnit;
    }

    public void setSoilTemperatureUnit(String soilTemperatureUnit) {
        this.soilTemperatureUnit = soilTemperatureUnit;
    }

    public Double getSoilMoisture() {
        return soilMoisture;
    }

    public void setSoilMoisture(Double soilMoisture) {
        this.soilMoisture = soilMoisture;
    }

    public String getSoiMoistureUnit() {
        return soiMoistureUnit;
    }

    public void setSoiMoistureUnit(String soiMoistureUnit) {
        this.soiMoistureUnit = soiMoistureUnit;
    }

    public Double getCam() {
        return cam;
    }

    public void setCam(Double cam) {
        this.cam = cam;
    }

    public String getCAMUnit() {
        return CAMUnit;
    }

    public void setCAMUnit(String CAMUnit) {
        this.CAMUnit = CAMUnit;
    }

    public Date getAcquisitionTime() {
        return acquisitionTime;
    }

    public void setAcquisitionTime(Date acquisitionTime) {
        this.acquisitionTime = acquisitionTime;
    }

    public String getDeleted() {
        return deleted;
    }

    public void setDeleted(String deleted) {
        this.deleted = deleted;
    }

    public String getEquipmentWorking() {
        return equipmentWorking;
    }

    public void setEquipmentWorking(String equipmentWorking) {
        this.equipmentWorking = equipmentWorking;
    }

    @Override
    public String toString() {
        return "MonitorMeteorologicalData{" +
        "id=" + id +
        ", baseId=" + baseId +
        ", equipmentId=" + equipmentId +
        ", electricEnergy=" + electricEnergy +
        ", electricEnergyUnit=" + electricEnergyUnit +
        ", illumination=" + illumination +
        ", illuminationUnit=" + illuminationUnit +
        ", windSpeed=" + windSpeed +
        ", windSpeedUnit=" + windSpeedUnit +
        ", windDirect=" + windDirect +
        ", windDirectUnit=" + windDirectUnit +
        ", airTemperature=" + airTemperature +
        ", airTemperatureUnit=" + airTemperatureUnit +
        ", humidity=" + humidity +
        ", humidityUnit=" + humidityUnit +
        ", rain=" + rain +
        ", rainUnit=" + rainUnit +
        ", soilTemperature=" + soilTemperature +
        ", soilTemperatureUnit=" + soilTemperatureUnit +
        ", soilMoisture=" + soilMoisture +
        ", soiMoistureUnit=" + soiMoistureUnit +
        ", cam=" + cam +
        ", CAMUnit=" + CAMUnit +
        ", acquisitionTime=" + acquisitionTime +
        ", deleted=" + deleted +
        ", equipmentWorking=" + equipmentWorking +
        "}";
    }

    public Double getCheckItem(String checkName){
        if(checkName.equals("electricEnergy"))
            return this.electricEnergy;
        else if(checkName.equals("illumination"))
            return this.illumination;
        else if(checkName.equals("windSpeed"))
            return this.windSpeed;
        else if(checkName.equals("windDirect"))
            return this.windDirect;
        else if(checkName.equals("airTemperature"))
            return this.airTemperature;
        else if(checkName.equals("humidity"))
            return this.humidity;
        else if(checkName.equals("rain"))
            return this.rain;
        else if(checkName.equals("soilTemperature"))
            return this.soilTemperature;
        else if(checkName.equals("soilMoisture"))
            return this.soilMoisture;
        else if(checkName.equals("cam"))
            return this.cam;
        else
            return -1.0;


    }
}
